Field
Apparatuses and methods consistent with the present disclosure relate to a shadow rendering apparatus and a control method thereof, and more particularly, to a shadow rendering apparatus that renders a shadow for a three-dimensional object, and a control method thereof.
Description of the Related Art
A shadow represented by an object generated by a three-dimensional modeling allows a screen to be substantially visualized and a relative relationship between objects to be detected. In a real time rendering, a method for generating a shadow using a shadow mapping is mainly used. In such method, after a shadow map is generated by rendering a z-buffer at a viewpoint of a light source, a shielding from the light source is determined by an additional depth test in a later shading process and brightness of the shading process is determined from a screen to be rendered.
Since the shadow map is simply generated and the determining of whether or not pixels of the screen have the shadow is not affected by scene complexity, the shadow mapping method is efficient, and since it is possible to perform acceleration using hardware, the shadow mapping method is frequently used in real time rendering. However, in the case in which one pixel occupies areas of several pixels at the viewpoint of the light source, the shadow mapping method has a disadvantage that aliasing of a lattice shape occurs at a shadow interface.
In the related art, in order to address the above-mentioned disadvantage, a percentage closer filtering (PCF) method in which an edge area of the shadow is softly modified by collectively filtering an edge portion of the shadow, a percentage closer soft shadow (PCSS) method in which a shadow area is calculated by generating a plurality of virtual rays in the shadow area, and the like were used. However, the PCF method has disadvantages that since the edge area is filtered in a uniform size, it is impossible to approximate a spreading effect of the shadow, and an additional amount of computation for filtering the edge area is required. In addition, in the PCSS method, since a blind degree should be calculated by sampling the virtual rays to calculate the blind degree of the shadow on all surfaces, there is a disadvantage that a large amount of computation is required for a shadow rendering every frame.